package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "sum_record",  catalog = "")
public class SumRecord implements Serializable {
    private Long id;
    private String operateType;
    private String czZy;
    private String sjSum;
    private String czJl;
    private Long newTime;
    private String czName;
    private String czAddr;

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "operate_type")
    public String getOperateType() {
        return operateType;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    @Basic
    @Column(name = "cz_zy")
    public String getCzZy() {
        return czZy;
    }

    public void setCzZy(String czZy) {
        this.czZy = czZy;
    }

    @Basic
    @Column(name = "sj_sum")
    public String getSjSum() {
        return sjSum;
    }

    public void setSjSum(String sjSum) {
        this.sjSum = sjSum;
    }

    @Basic
    @Column(name = "cz_jl")
    public String getCzJl() {
        return czJl;
    }

    public void setCzJl(String czJl) {
        this.czJl = czJl;
    }

    @Basic
    @Column(name = "new_time")
    public Long getNewTime() {
        return newTime;
    }

    public void setNewTime(Long newTime) {
        this.newTime = newTime;
    }

    @Basic
    @Column(name = "cz_name")
    public String getCzName() {
        return czName;
    }

    public void setCzName(String czName) {
        this.czName = czName;
    }

    @Basic
    @Column(name = "cz_addr")
    public String getCzAddr() {
        return czAddr;
    }

    public void setCzAddr(String czAddr) {
        this.czAddr = czAddr;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SumRecord sumRecord = (SumRecord) o;
        return Objects.equals(id, sumRecord.id) &&
                Objects.equals(operateType, sumRecord.operateType) &&
                Objects.equals(czZy, sumRecord.czZy) &&
                Objects.equals(sjSum, sumRecord.sjSum) &&
                Objects.equals(czJl, sumRecord.czJl) &&
                Objects.equals(newTime, sumRecord.newTime) &&
                Objects.equals(czName, sumRecord.czName) &&
                Objects.equals(czAddr, sumRecord.czAddr);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, operateType, czZy, sjSum, czJl, newTime, czName, czAddr);
    }
}
